#include<iostream>

unsigned int c_in_str(const char* str, char ch);


int main()
{
    using namespace std;
    //char mmm[15] = "minimax";
    char mmm[15] = {'m','m','x'};
    char* uu = "ulilute";
    unsigned int im = c_in_str(mmm, 'm');
    unsigned int iu = c_in_str(uu, 'u');
    cout << "im: " << im << endl;
    cout << "iu: " <<iu << endl;

    return 0;
}

unsigned int c_in_str(const char* str, char ch)
{
    unsigned int cnt = 0;
    while( *str )
    {
        if(*str == ch )
            cnt++;
        str++;
    }
    return cnt;

}